Skip to content

feat(node): expose the GRANDPA RPC so external verifiers can prove Orbinum finality - #144

Merged
nol4lej merged 1 commit into
mainfrom
feat/grandpa-rpc
Sep 4, 2026
Merged

feat(node): expose the GRANDPA RPC so external verifiers can prove Orbinum finality#144
nol4lej merged 1 commit into
mainfrom
feat/grandpa-rpc

Conversation

@nol4lej

@nol4lej nol4lej commented Sep 4, 2026

Copy link
Copy Markdown
Member

Why

While reviewing our testnet onboarding request (#1200), Hyperbridge asked us to wire the GRANDPA RPC into our node, they found it exposes no GRANDPA methods.

They were right: it was never wired in, so sc-consensus-grandpa-rpc wasn't even a dependency. Their prover needs grandpa_proveFinality to verify Orbinum finality.

Node-side only: no runtime change, spec_version stays at 11.

What

Wires sc_consensus_grandpa_rpc::Grandpa following the canonical pattern from polkadot-service/polkadot-rpc.

One thing needed care: SharedVoterState is now created once and shared with the voter. It used to be built inline at the voter, and a detached instance leaves grandpa_roundState reporting zeroed rounds instead of failing.

Pinned to sc-consensus-grandpa-rpc 0.44.0 — 0.45.0 would put two copies of sc-consensus-grandpa in the lockfile.

Verified on a dev node

grandpa_roundState returns live data (round: 87, real weights), which is what proves the voter state is shared.

Same binary, same flags, only the code differs:

baseline:    187 methods, 0 grandpa
with change: 191 methods  (+proveFinality +roundState +subscribeJustifications +unsubscribe)

Exactly four added, nothing removed. All work under --rpc-methods Safe, which the public endpoint uses, they serve finality proofs for already-final blocks, public by definition.

cargo test 12/12, clippy and fmt clean.

@nol4lej
nol4lej merged commit edfbcc7 into main Sep 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant